The change to take out unneeded NULL checks requires some care
at startup: we check both adjustments when any of them changes;
we need to do those checks in the same order in which we create
the scrollbars, otherwise we'll try to get the adjustment of
the vscrollbar when we just set the up the hscrollbars' adjustment.
return;
/* Ensure GtkAdjustment and unclamped values are in sync */
- if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->vscrollbar)))
- priv->unclamped_vadj_value = gtk_adjustment_get_value (adjustment);
- else if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->hscrollbar)))
+ if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->hscrollbar)))
priv->unclamped_hadj_value = gtk_adjustment_get_value (adjustment);
+ else if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->vscrollbar)))
+ priv->unclamped_vadj_value = gtk_adjustment_get_value (adjustment);
}
static void